﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace InterValometer
{
    class Location
    {
        public Location()
        {
            this.UID = -1;
            this.Name = "";
            this.LatitudeDegrees = 0;
            this.LatitudeMinutes = 0;
            this.LatitudeSeconds = 0;
            this.LongitudeDegrees = 0;
            this.LongitudeMinutes = 0;
            this.LongitudeSeconds = 0;
        }

        public Location(int loc_uid, string loc_nam, int loc_lat_deg, int loc_lat_min, decimal loc_lat_sec,
            int loc_lon_deg, int loc_lon_min, decimal loc_lon_sec)
        {
            this.UID = loc_uid;
            this.Name = loc_nam;
            this.LatitudeDegrees = loc_lat_deg;
            this.LatitudeMinutes = loc_lat_min;
            this.LatitudeSeconds = loc_lat_sec;
            this.LongitudeDegrees = loc_lon_deg;
            this.LongitudeMinutes = loc_lon_min;
            this.LongitudeSeconds = loc_lon_sec;
        }

        public override string ToString()
        {
            string output = "UID=" + this.UID + ", Name=" + this.Name + ", Lat. Degrees=" + this.LatitudeDegrees + ", Lat. Minutes=" + this.LatitudeMinutes + ", Lat. Seconds=" + this.LatitudeSeconds;
            output += "Lon. Degrees=" + this.LongitudeDegrees + ", Lon. Minutes=" + this.LongitudeMinutes + ", Lon. Seconds=" + this.LongitudeSeconds;
            return output;
        }

        public int UID { get; set; }
        public string Name { get; set; }
        public int LatitudeDegrees { get; set; }
        public int LatitudeMinutes { get; set; }
        public decimal LatitudeSeconds { get; set; }
        public int LongitudeDegrees { get; set; }
        public int LongitudeMinutes { get; set; }
        public decimal LongitudeSeconds { get; set; }
    }
}
